/***************************************************
Copyright (C) 2021
未经本人同意，不得转载
www.zeai.cn
www.a9a.cn
www.yzlove.com
作 者:郭余林 QQ:797311 (supdes)
***************************************************/
document.write('<input type="hidden" id="p" value="1" />');
var loadswitch=true;
window.onhashchange = processHash;//window.onload = processHash;
document.body.onscroll = function(){
	var tt = zeai.getScrollTop(),cH= parseInt(document.documentElement.clientHeight),sH= parseInt(document.body.scrollHeight);//cH=document.documentElement.clientHeight;
	sessionStorage.tt=tt;
	if ((sH-tt-cH) <100 && loadswitch){
		var i = parseInt(o("p").value);
		i++;o("p").value = i;
		location.hash = "#" + i;
		if (i > ZEAI_totalP){
			location.hash = "#" + ZEAI_totalP;
			o("p").value  = ZEAI_totalP;
			return false;
		}else{
			loadswitch=false;
			Object.assign(zeaiOnscroll_json.data,{p:i});
			zeai.ajax(zeaiOnscroll_json,function(e){
				if (e == 'end'){
					return false;
				}else{
					ZEAI_list.append(e);
					sessionStorage.tmplist += e;
					loadswitch=true;
				}
			});
		}
	}
	backtopFn();
}
window.addEventListener('pageshow', function (event) {
	if(event.persisted || window.performance && window.performance.navigation.type == 2){
		o('ZEAI_list').html(sessionStorage.tmplist);
		zeai.setScrollTop(sessionStorage.tt);
		loadswitch=true;
	}
},false);